package com.smart_campus.sys.domain;

import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author Alfred
 * @date 2020/6/12 11:31
 */
@Data
@AllArgsConstructor

public class Dept implements Serializable {

    public Dept(){}

    private Integer id;

    private Integer pid;

    private String title;

    private Integer spread;

    private String remark;

    private String address;

    private Integer available;

    private Integer ordernum;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    private Boolean open;

    private static final long serialVersionUID = 1L;

    public Boolean getOpen() {
        return this.spread== 1?true:false;
    }
}